package pers.cj.pdos.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;
import pers.cj.pdos.entity.PayWait;
import pers.cj.pdos.vo.PayWaitVo;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author chenj
 * @since 2020-01-19
 */
public interface IPayWaitService extends IService<PayWait> {

    List<Map> listVo(String companyId,
                     Integer page,
                     Integer limit,
                     String storeId,
                     String providerTypeId,
                     Boolean notNeedPay,
                     Boolean providerNoStop,
                     String search);

    Long count(String companyId,
               String storeId,
               String providerTypeId,
               Boolean notNeedPay,
               Boolean providerNoStop,
               String search);

    PayWaitVo getVoByProvider(String providerId);

    /**
     * 获取供应商的欠款明细
     * @param providerId
     * @param page
     * @param limit
     * @param close
     * @param search
     * @param no
     * @param userId
     * @param date1
     * @param date2
     * @param flag
     * @param storeId
     * @return
     */
    List<Map> listDetail(String providerId,
                         Integer page,
                         Integer limit,
                         Boolean close,
                         String search,
                         String no,
                         String remark,
                         String userId,
                         Date date1,
                         Date date2,
                         Integer flag,
                         String storeId);

    /**
     * 获取供应商的欠款明细个数
     * @param providerId
     * @param close
     * @param search
     * @param no
     * @param userId
     * @param date1
     * @param date2
     * @param flag
     * @param storeId
     * @return
     */
    long countDetail(String providerId,
                     Boolean close,
                     String search,
                     String no,
                     String remark,
                     String userId,
                     Date date1,
                     Date date2,
                     Integer flag,
                     String storeId);

    BigDecimal getTotalAmount(String companyId);
}
